<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>多文件上传</title>
<script type="text/javascript">
 function addFile() {
	var div =document.getElementById("content");
	div.innerHTML+="<div><input type='file' name ='f'><input type='button' value='remove file' onclick='removeFile(this)'></div>"
}
 function removeFile(btn){
	 document.getElementById("content").removeChild(btn.parentNode);
 }

</script>
</head>
<body>
<input type="button" value="add file" onclick="addFile();" ><br>
<form action="/jspTest/upload1" method="post" enctype="multipart/form-data">
<input type="file" name ="f"><br>
<div id="content"></div>
<input type="submit">
</form>
</body>
</html>